<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/include/tag.jsp" %>
<%@ include file="/WEB-INF/include/common.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>贷款方案详情</title>
    <style type="text/css">
        table td {
            text-align: center;
        }
    </style>
</head>
<body>
<div style="margin-left: 50px;margin-right: 50px;margin-top: 30px">
    <nav class="navbar navbar-default">
        <div class="container-fluid" style="padding-left: 530px">
            <div class="navbar-header">
                <p class="nav navbar-nav text-center"><a class="navbar-brand" href="#">${title}方案</a></p>
            </div>
        </div>
    </nav>
    <br>
    <div class="cont">
        <c:forEach var="item" items="${list}" varStatus="status">
            <div>
                <label style="color:red;font-size:26px">方案${status.index+1 }</label>
                <br>
                <label>还款总额：</label>
                <span style="height:25px;color:red;">
                    <fmt:formatNumber type="number" value="${item.totalMoney}" maxFractionDigits="2"/>
                </span>元&nbsp;&nbsp;&nbsp;
                <label>总利息：</label>
                <span style="height:25px;color:red">
                    <fmt:formatNumber type="number" value="${item.totalAccrual}" maxFractionDigits="2"/>
                </span>元&nbsp;&nbsp;&nbsp;
                <label>每月共还款：</label>
                <span style="height:25px;color:red">
                    <fmt:formatNumber type="number" value="${(item.totalMoney/installment)}" maxFractionDigits="2"/>
                </span>元&nbsp;&nbsp;&nbsp;
                <label>每月利息：</label>
                <span style="height:25px;color:red">
                    <fmt:formatNumber type="number" value="${(item.totalAccrual/installment)}" maxFractionDigits="2"/>
                </span>元&nbsp;&nbsp;&nbsp;
                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>产品名</th>
                        <th>贷款额（元）</th>
                        <th>还款额（元）</th>
                        <th>利息（元）</th>
                        <th>每月还款（元）</th>
                        <th>最高比例</th>
                        <th>最高额度（元）</th>
                        <th>利率</th>
                        <th>贷款期限</th>
                        <th>办理场所</th>
                        <th>办理周期</th>
                        <th>是否抵押</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach var="list" items="${item.planList}" varStatus="status">
                        <tr>
                            <td>${list.loanVo.productName }</td>
                            <td>
                                <fmt:formatNumber type="number" value="${list.money }" maxFractionDigits="2"/>
                            </td>
                            <td>
                                <fmt:formatNumber type="number" value="${list.totalMoney }" maxFractionDigits="2"/>
                            </td>
                            <td>
                                <fmt:formatNumber type="number" value="${list.accrual }" maxFractionDigits="2"/>
                            </td>
                            <td>
                                <fmt:formatNumber type="number" value="${list.totalMoney/installment }" maxFractionDigits="2"/>
                            </td>
                            <td>${list.loanVo.amountScale }%</td>
                            <td>
                                <fmt:formatNumber type="number" value="${list.loanVo.amount }" maxFractionDigits="2"/>
                            </td>
                            <td>${list.loanVo.rate }</td>
                            <td>${installment}月</td>
                            <td>
                                <c:if test="${list.loanVo.place==0 }">
                                    线上/线下
                                </c:if>
                                <c:if test="${list.loanVo.place==1 }">
                                    线上
                                </c:if>
                                <c:if test="${list.loanVo.place==2 }">
                                    线下
                                </c:if>
                            </td>
                            <td>${list.loanVo.period }工作日</td>
                            <td>
                                <c:if test="${list.loanVo.isPledge==0}">
                                    否
                                </c:if>
                                <c:if test="${list.loanVo.isPledge==1}">
                                    是
                                </c:if>
                            </td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
        </c:forEach>
    </div>
</div>
</body>
</html>